import request from '@/api/request/index'
import type {
  ShuiDanXiaZaiCanShu,
  KaiFaCaiGouDanXinXiChaXunDTO,
  YueJieZhangDanXinXi,
  PageDataInvoiceMonthDevDto,
  PageDataKaiFaCaiGouDanXinXi,
  PageDataGongYingShangHuiZongShuJuDto,
  KaiFaChaXunGongYingShangXinXi,
  KuanXiangBeiZhu,
  ZhangDanXiaDeFuKuanDan
} from './_interfaces.ts'

/** 月度账单水单下载 */
export function developPoManageBillPaymentFileDownload(data: ShuiDanXiaZaiCanShu): Promise<any> {
  return request.post('/api/developPoManage/billPaymentFileDownload', data)
}

/** 根据开发者下载对应的供应商采购单信息 */
export function developPoManageDownPoInfoByDevelop(data: KaiFaCaiGouDanXinXiChaXunDTO): Promise<any> {
  return request.post('/api/developPoManage/downPoInfoByDevelop', data)
}

/** 获取供应商列表信息 */
export function developPoManageGetSupplierList(data?: any): Promise<any> {
  return request.get('/api/developPoManage/getSupplierList', data)
}

/** 开发侧月结账单汇总导出 */
export function developPoManageMonthBillDevExport(data: YueJieZhangDanXinXi): Promise<any> {
  return request.post('/api/developPoManage/monthBillDevExport', data)
}

/** 月结账单列表分页查询 */
export function developPoManageQueryInvoiceMonthDev(data: YueJieZhangDanXinXi): Promise<PageDataInvoiceMonthDevDto> {
  return request.post('/api/developPoManage/queryInvoiceMonthDev', data)
}

/** 月结账单汇总 */
export function developPoManageQueryInvoiceMonthDevSummary(data: YueJieZhangDanXinXi): Promise<any> {
  return request.post('/api/developPoManage/queryInvoiceMonthDevSummary', data)
}

/** 采购单状态汇总 */
export function developPoManageQueryPoDevSummary(data: KaiFaCaiGouDanXinXiChaXunDTO): Promise<any> {
  return request.post('/api/developPoManage/queryPoDevSummary', data)
}

/** 根据开发者查询对应的供应商采购单信息 */
export function developPoManageQueryPoInfoByDevelop(
  data: KaiFaCaiGouDanXinXiChaXunDTO
): Promise<PageDataKaiFaCaiGouDanXinXi> {
  return request.post('/api/developPoManage/queryPoInfoByDevelop', data)
}

/** 根据PO单ID查询SKU信息 */
export function developPoManageQueryPoSkuByPoId(data: KaiFaCaiGouDanXinXiChaXunDTO): Promise<any> {
  return request.post('/api/developPoManage/queryPoSkuByPoId', data)
}

/** 供应商数据明细列表 */
export function developPoManageQuerySupplierDev(
  data: KaiFaChaXunGongYingShangXinXi
): Promise<PageDataGongYingShangHuiZongShuJuDto> {
  return request.post('/api/developPoManage/querySupplierDev', data)
}

/** 供应商数据明细列表导出 */
export function developPoManageSupplierDevExport(): Promise<any> {
  return request.get('/api/developPoManage/supplierDevExport')
}

/** 修改账单下款项备注 */
export function developPoManageUpdateMonthMoneyRemark(data: KuanXiangBeiZhu): Promise<boolean> {
  return request.post('/api/developPoManage/updateMonthMoneyRemark', data)
}

/** 修改账单下付款申请单 */
export function developPoManageUpdatePaymentApplyNo(data: ZhangDanXiaDeFuKuanDan): Promise<boolean> {
  return request.post('/api/developPoManage/updatePaymentApplyNo', data)
}
